package com.design.cjm.structural.proxy.example1;

/**
 * @Author: Jie Ming Chen
 * @Date: 2018/9/20
 * @Version 1.0
 */
public class Proxy extends Subject{

    private RealSubject realSubject;

    @Override
    void request() {

        if (realSubject == null) {
            realSubject = new RealSubject();
        }

        realSubject.request();
    }
}
